package com.paic.mhis.hcpms.quota.exportword.jfreechart;

import java.util.Map;

import com.paic.mhis.hcpms.quota.exportword.dto.BaseChartDTO;

/**  
 * 构造meter image 参数的帮助类 
 * @author:     EX-XIONGFEI002
 * @version:    
 */
public class MakeJFreeChartImgParamHelper {

	/**
	 * Description:    
	 * @param meterParams meterParams[0] chartName meterParams[1] yoySuff meterParams[2] kpiId meterParams[3] yoymomFlag meterParams[4] increaseFlag   
	 * @param paramMap 
	 */
	public static void makeMeterImgParamData(Map<String, Object> resultMap, Map<String, Object> paramMap,
			Map<String, Object> kpiLimitMap, String[] meterParams) {

		// chartName
		paramMap.put("meter_title", meterParams[0]);
		// yoy 比值
		paramMap.put("meter_rate_flag", resultMap.get(meterParams[1]));

		if ("0".equals(meterParams[3])) {
			paramMap.put("meter_yoy_upper_limit", kpiLimitMap.get(meterParams[2] + "_yoy_upper_end"));
			paramMap.put("meter_yoy_lower_limit", kpiLimitMap.get(meterParams[2] + "_yoy_lower_end"));

		} else if ("1".equals(meterParams[3])) {
			paramMap.put("meter_mom_upper_limit", kpiLimitMap.get(meterParams[2] + "_mom_upper_end"));
			paramMap.put("meter_mom_lower_limit", kpiLimitMap.get(meterParams[2] + "_mom_lower_end"));
		}

		// 增加还是降低
		paramMap.put("yoyFlag", meterParams[3]);
		paramMap.put("increaseFlag", resultMap.get(meterParams[4]));

	}

	/**
	 * 构造xy趋势图的参数  
	 * @param paramMap    paramMap
	 * @param resultMap   resultMap
	 * @param chartName   chartName
	 * @param numberType  numberType
	 */
	public static void makeXYImgParamData(Map<String, Object> paramMap, Map<String, Object> resultMap,
			String chartName, String numberType, String fileParty) {

		paramMap.put("xyLine_chartDTO", new BaseChartDTO(chartName, numberType));
		/*paramMap.put("xyLine_chartDataDTO",
				RtfElementDataHelper.getInstance().createHospAOutpatFeeSeriesList(resultMap, fileParty, true));*/
	}

}
